<?

require_once("mysql.php");
require_once("utilities.php");

@$name = trim($_GET['name']);
@$email = trim($_GET['email']);
@$message = trim($_GET['message']);

sleep(1);

if (empty($name)    || strlen($name)    > 60  ) die('name');
if (empty($email)   || strlen($email)   > 60  ) die('email');
if (empty($message) || strlen($message) > 1500) die('message');

if (!valid_email($email)) die('email');



$q = "INSERT INTO feedback (name, email, message) VALUES ('%s', '%s', '%s')";
$q = sprintf($q, ESC($name), ESC($email), ESC($message));

MYSQL_Q($q);

?>